import java.util.Scanner;

public class NestedIf {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.println("请输入参赛选手的性别和初赛成绩：");
        double score = scanner.nextDouble();
        char gender = scanner.next().charAt(0);
        if (score > 8.0) {
            if (gender == '男') {
                System.out.println("进入男子组决赛！");
            }
            if (gender == '女') {
                System.out.println("进入女子组决赛！");
            }
        } else {
            System.out.println("很遗憾，该选手被淘汰！");
        }
    }
}
